﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YiMeiJiaLibModel.Business.Dto
{
    /// <summary>
    ///     货品
    /// </summary>
    public partial class CoreCmsProductsDto
    {
        /// <summary>
        ///     商品编码
        /// </summary>
         
        public string bn { get; set; }

        /// <summary>
        ///     商品名称
        /// </summary>
       
        public string name { get; set; }

        /// <summary>
        ///     是否上架
        /// </summary>
        
        public bool isMarketable { get; set; }


        /// <summary>
        ///     商品单位
        /// </summary>
         
        public string unit { get; set; }

        /// <summary>
        ///     原始总库存
        /// </summary>
        
        public int totalStock { get; set; } = 0;

        /// <summary>
        ///     会员价格体系
        /// </summary>
        
        public List<CoreCmsGoodsGrade> gradePrice { get; set; } = new();

        /// <summary>
        ///     关联会员级别
        /// </summary>
      
        public object gradeInfo { get; set; }

        /// <summary>
        ///     初始化匹配sku
        /// </summary>
        
        public Dictionary<string, Dictionary<string, DefaultSpesDesc>> defaultSpecificationDescription { get; set; } =
            new();

        /// <summary>
        ///     商品总价格,商品单价乘以数量
        /// </summary>
       
        public decimal amount { get; set; } = 0;

        /// <summary>
        ///     促销列表
        /// </summary>
        
        public Dictionary<int, WxNameTypeDto> promotionList { get; set; } = new();

        /// <summary>
        ///     促销金额
        /// </summary>
        
        public decimal promotionAmount { get; set; } = 0;

        /// <summary>
        ///     拼团购买数量
        /// </summary>
       
        public int buyPinTuanCount { get; set; } = 0;

        /// <summary>
        ///     促销购买件数
        /// </summary>
      
        public int buyPromotionCount { get; set; } = 0;

        /// <summary>
        ///     是否参与拼团规则
        /// </summary>
       
        public CoreCmsPinTuanRule pinTuanRule { get; set; }

        /// <summary>
        ///     一级佣金
        /// </summary>
         
        public decimal levelOne { get; set; } = 0;

        /// <summary>
        ///     二级佣金
        /// </summary>
       
        public decimal levelTwo { get; set; } = 0;

        /// <summary>
        ///     三级佣金
        /// </summary>
       
        public decimal levelThree { get; set; } = 0;
    }
    /// <summary>
    ///     wx返回Name/Type格式实体
    /// </summary>
    public class WxNameTypeDto
    {
        public string name { get; set; }

        public int type { get; set; }
    }
}
